arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]

arr2 = arr[0:-1]

print("arr", arr)
print("arr2", arr2)

res = arr2.index(5)

print("res", res)

# arr unique
arr3 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
print("arr3", arr3)
arr3_unique = list(set(arr3))
print("arr3_unique", arr3_unique)

# arr 最大值
arr3_max = max(arr3)
print("arr3_max", arr3_max)

# arr 最小值
arr3_min = min(arr3)
print("arr3_min", arr3_min)

# arr 求和
arr3_sum = sum(arr3)
print("arr3_sum", arr3_sum)

# arr 求平均值
arr3_avg = sum(arr3) / len(arr3)
print("arr3_avg", arr3_avg)

# arr 求中位数
arr3_median = sorted(arr3)[len(arr3) // 2]
print("arr3_median", arr3_median)

# arr 向下取整数
med_lower = len([1, 2, 3, 4, 5]) // 2
print(f"med_lower:{med_lower}")

# arr 向上取整数
med_upper = len([1, 2, 3, 4, 5, 6, 7]) // 2 + 1
print(f"med_upper:{med_upper}")
